# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-jaraco.context
pkgver=4.3.0
pkgrel=1
pkgdesc="Context managers by jaraco"
url="https://github.com/jaraco/jaraco.context"
arch="noarch"
license="MIT"
depends="python3"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-setuptools_scm
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/j/jaraco.context/jaraco.context-$pkgver.tar.gz"
builddir="$srcdir/jaraco.context-$pkgver"

# backwards compatibility for old name
replaces="py3-jaraco-context"
provides="py3-jaraco-context=$pkgver-r$pkgrel"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/jaraco.context-$pkgver-py3-none-any.whl
}

sha512sums="
8882229fa1a68f2733ec4103fbeaf47625b19790f4461ab18df4c1f1a99d4d26d10d7381ab68ba5df48616a1fdb2d5e4a767496a0e40658fd011ed9cd39255de  jaraco.context-4.3.0.tar.gz
"
